package com.zhuiYun.project.api.appletshoppingcart.service;

import com.zhuiYun.project.api.appletshoppingcart.model.AppletShoppingCartModel;
import com.zhuiYun.project.common.errorCode.CommonException;
import com.zhuiYun.project.common.response.CommonResult;

/**
 * @author lyp
 * @className AppletShoppingCartService
 * @description TODO
 * @date 2023/4/5 9:39
 */
public interface AppletShoppingCartService {

    /**
     * @author lyp
     * @description 根据时间类型查询购物车商品
     * @date 2023/4/5 10:19
     * @param: typeId
     * @return CommonResult
     */
    CommonResult selectShoppingCart(Integer typeId,String type,Integer userId);

    /**
     * @author lyp
     * @description TODO
     * @date 2023/4/6 20:08
     * @param: id 物品id
     * @param: userId 用户id
     * @return CommonResult
     */
    CommonResult delItemsInShoppingCart(AppletShoppingCartModel appletShoppingCartModel);

    /**
     * @author lyp
     * @description 将购物车内的商品移入到我的个人收藏
     * @date 2023/4/7 9:38
     * @param appletShoppingCartModel
     * @return CommonResult
     */
    CommonResult cartMoveIntoCollection(AppletShoppingCartModel appletShoppingCartModel);

    /**
     * @author lyp
     * @description 持久化用户购物车信息 例如 ：加了一个商品数量等
     * @date 2023/4/7 11:46
     * @param appletShoppingCartModel
     * @return CommonResult
     */
    CommonResult persistingUserShoppingCartInfo(AppletShoppingCartModel appletShoppingCartModel);

    /**
     * @author lyp
     * @description 持久化用户选中商品
     * @date 2023/4/8 9:22
     * @param: appletShoppingCartModel
     * @return CommonResult
     */
    CommonResult persistingFlag(AppletShoppingCartModel appletShoppingCartModel) throws CommonException;

    /**
     * @author lyp
     * @description 用户结算购物车内的商品
     * @date 2023/4/10 11:36
     * @param
     * @return CommonResult
     */
    CommonResult closeAnAccount() throws CommonException;

    /**
     * @author lyp
     * @description 根据用户id查询用户勾选的商品
     * @date 2023/4/11 13:28
     * @param: userId 用户id
     * @return CommonResult
     */
    CommonResult getShoppingCartInfo(Integer userId);

    /**
     * @author lyp
     * @description 用户结算购物车内的diy，进行diy查询
     * @date 2023/4/11 14:53
     * @param: userId 用户id
     * @return CommonResult
     */
    CommonResult getShoppingCartInfoDiy(Integer userId);

    /**
     * @author lyp
     * @description 查询用户默认地址
     * @date 2023/4/14 9:02
     * @param userId
     * @return CommonResult
     */
    CommonResult getUserAddress(Integer userId);
}
